package com.zygh.policeasset.mapper;

import com.zygh.policeasset.pojo.DepreciationPolicy;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
/* loaded from: police-asset-2.0-0.0.1-SNAPSHOT.jar:BOOT-INF/classes/com/zygh/policeasset/mapper/DepreciationPolicyMapper.class */
public interface DepreciationPolicyMapper {
    @Select({"select * from depreciation_policy "})
    @Results({@Result(property = "whetherToEnable", column = "whether_to_enable")})
    List<DepreciationPolicy> findAll();

    @Insert({"insert into depreciation_policy (name,comtent,whether_to_enable) values (#{name},#{comtent},#{whetherToEnable})"})
    Integer add(DepreciationPolicy depreciationPolicy);

    @Update({"<script>update depreciation_policy <set><if test='name != null and name.length &gt; 0'>name=#{name},</if><if test='comtent != null and comtent.length &gt; 0'>comtent=#{comtent},</if><if test='whetherToEnable != null '>whether_to_enable=#{whetherToEnable},</if></set>where id=#{id}</script>"})
    Integer update(DepreciationPolicy depreciationPolicy);

    @Delete({"delete from depreciation_policy where id=#{id}"})
    Integer delete(int i);

    @Update({" update  depreciation_policy set whether_to_enable = 0"})
    Integer updateToEnable();
}